Skip to main content

PooledObject<T>

this is RAII object to automatically release pooled object when its owning pool

Assembly: ServiceStack.Text.dll
View Source
Declaration
public struct PooledObject<T> : IDisposable where T : class

Properties

Object

View Source
Declaration
public readonly T Object { get; }

Methods

Dispose()

View Source
Declaration
public void Dispose()

Create(ObjectPool<StringBuilder>)

View Source
Declaration
public static PooledObject<StringBuilder> Create(ObjectPool<StringBuilder> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool

Create<TItem>(ObjectPool<Stack<TItem>>)

View Source
Declaration
public static PooledObject<Stack<TItem>> Create<TItem>(ObjectPool<Stack<TItem>> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool
Type Parameters
  • TItem

Create<TItem>(ObjectPool<Queue<TItem>>)

View Source
Declaration
public static PooledObject<Queue<TItem>> Create<TItem>(ObjectPool<Queue<TItem>> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool
Type Parameters
  • TItem

Create<TItem>(ObjectPool<HashSet<TItem>>)

View Source
Declaration
public static PooledObject<HashSet<TItem>> Create<TItem>(ObjectPool<HashSet<TItem>> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool
Type Parameters
  • TItem

Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>>)

View Source
Declaration
public static PooledObject<Dictionary<TKey, TValue>> Create<TKey, TValue>(ObjectPool<Dictionary<TKey, TValue>> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool
Type Parameters
  • TKey
  • TValue

Create<TItem>(ObjectPool<List<TItem>>)

View Source
Declaration
public static PooledObject<List<TItem>> Create<TItem>(ObjectPool<List<TItem>> pool)
Returns

ServiceStack.Text.Pools.PooledObject<T>

Parameters
TypeName
ServiceStack.Text.Pools.ObjectPool<T>pool
Type Parameters
  • TItem

Implements

  • System.IDisposable